<%@ page import="java.util.List" %>
<%@ page import="org.example.onetry.user.users" %><%--
  Created by IntelliJ IDEA.
  User: wwzd1
  Date: 2024/12/25
  Time: 0:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        .m{
            width: 15%;
            margin: 20px auto;

        }
    </style>
</head>
<body>
<% //编写java代码，jsp与前端html的最大区别就是jsp能写java代码
    //通过request获取绑定的对象
    List<users> usrs= (List<org.example.onetry.user.users>) request.getAttribute("cs");
%>
<div class="m">
<table border="1"cellpadding="6"cellspacing="0">
    <%for(users c:usrs){ %>
    <tr>
        <!--"="代替了response.getwriter().println()，输出到页面，不用加分号-->
        <td><%= c.getId()%></td>
        <td><%= c.getNa()%></td>
        <td><%= c.getCon()%></td>
    </tr>
    <% }%>

</table>
</div>
</body>
</html>
